﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Payout_pf.aspx.cs" Inherits="AiRiZu.User.Payout_pf" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<title>
	爱日租—全球最时尚、最具先锋概念的房屋日租、短租服务网站！
</title>
<meta content="爱日租,日租,短租,租房,家庭公寓,自助公寓,家庭旅馆,旅游" name="keywords"/>
<meta content="爱日租是国内首家专注房屋短期租赁的信息发布和在线交易的网站，为房主和租户搭建起最值得信赖的沟通和交易平台" name="description"/>

<link rel="stylesheet" href="css/css.css" />
<link rel="stylesheet" href="css/common.css" />
<link rel="stylesheet" href="css/pixie.css" />
<link rel="stylesheet" href="css/pixie.css" />
<link rel="stylesheet" href="../FileUploader/fileuploader.css" />
<link rel="stylesheet" href="../css/imgareaselect-default.css"/>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<meta name="layout" content="main"/>
<link rel="stylesheet" href="css/dashboard.css" />
<link rel="stylesheet" href="css/voucher.css" />
<link rel="shortcut icon" href="/images/favicon.ico" type="image/x-icon" />
<script type="text/javascript" src="js/jquery.min.js"></script>
<script type="text/javascript" src="js/jquery-ui.min.js"></script>
<script type="text/javascript" src="js/application6.js"></script>
<script type="text/javascript" src="js/home.js"></script>
<script type="text/javascript" src="js/translate.js"></script>
<script type="text/javascript" src="js/s_code.js?vid=1"></script>

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<meta name="layout" content="main"/>
<link rel="stylesheet" href="/css/dashboard.css" />
<script type="text/javascript">
<!--
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function tab_shift(categoryId) {
	$("#tenpay_account").disabled = true;
	$("#alipay_account").disabled = true;
	$("#" + categoryId).disabled = null;
}
//-->
</script>


<script type="text/javascript">

//$(document).ready(function(){
//        opts = {};
//        AirbnbHomePage.init(opts);
//    });

function addEventHandler(target, type, func) { 
    if (target.addEventListener) 
        target.addEventListener(type, func, false); 
    else if (target.attachEvent) 
        target.attachEvent("on" + type, func); 
    else target["on" + type] = func; 
} 
addEventHandler(document, 'scroll', function() {
	document.getElementById('list_loading').style.top = $('body').scrollTop() + 'px';
});

function shiftLanguage(lang, country) {
	$.ajax({
		   type: "POST",
		   url: "/ajax/versionInternationalize",
		   data: 'lang=' + lang + '&country=' + country,
		   success: function(msg){
		   	   if(msg == 'success') {
		   	   	   window.location.reload(true);
		   	   }
		   }
		 });
}

//$(document).bind('click',function(event){  
//    var url = event.target.href;
//    if(event.target.parentNode.href) {
//		url = event.target.parentNode.href;
//    }
//    if(url && url.indexOf('http://') == 0) {
//    	if(url.indexOf("?") != -1 && (url.indexOf("/city") != -1 || url.indexOf("/list") != -1 || url.indexOf("/show") != -1)) {
//	    	post_to_url(url);
//	        event.preventDefault();  
//	        event.stopPropagation();
//    	}  
//    }  
//      
//},true);

function post_to_url(url) {
	var flag = false; // 目录到/room/show页面时是弹出新窗口，flag = false 不弹出，true是弹出
	if(url.indexOf("/room/show") != -1 && url.indexOf("?src=list") != -1){
        flag = true;
    }

    var form = document.createElement("form");
    var baseUrl = url.substring(0, url.indexOf("?"));
    var params = url.substring(url.indexOf("?") + 1, url.length);
    params = decodeURIComponent(params);
    params = params.replace("+", " ");
    var s = params.split("&");
    form.setAttribute("method", "post");
    form.setAttribute("action", baseUrl);
    for(var i = 0; i < s.length; i ++) {
        var hiddenField = document.createElement("input");
        hiddenField.setAttribute("type", "hidden");
        hiddenField.setAttribute("name", s[i].split("=")[0].replace('locationSearch', 'location'));
        hiddenField.setAttribute("value", s[i].split("=")[1]);
        form.appendChild(hiddenField);
    }
    $('body').append(form);
    if(flag){
        form.target="_blank"; // /room/show 新窗口弹出
    }
    
    form.submit();
}
</script>

<!--google analytics-->
<script type="text/javascript">

  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-22185191-1']);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();

</script>

</head>
<body>
	<div name="waitingDiv" id="waitingDiv" style="display: none;">
		<div id="list_loading" name="list_loading">
			<div id="list_loading_wrapper" class="rounded_more">
				<img src="/images/home_spinner.gif"
					style="display: block; float: left; padding: 0 12px 0 0;" />页面载入中...
			</div>
		</div>
	</div></div>
	<div class="header">
		<a class="logo" title="爱日租" href="/;jsessionid=4C132288712528F53CD60D403DEC3E02"></a>
	  <div class="top_bar">
		<ul class="nav">
			
				<li><span class="SayHi">嗨！
					wang weibin
				</span>
				</li>
				
					<script type="text/javascript">

						loadUnReadMessages();
						function loadUnReadMessages(){
							$.ajax({
	   							type: "POST",
	   							url: "/ajax/userUnreadMessage",
	   							data: 1,
	   							success: function(result){
		   							$("#unReadMessages").text(result);
		   								
								}
	 						});	
						}
						//定时器
						setInterval("loadUnReadMessages()", 15000);
					
					
</script>

					<li><a href="DashBoard.aspx">用户中心</a> 
					</li>
					
					<li>
					<strong>
						<a href="/message/inbox?offset=0" class="message">
							<span id="unReadMessages"></span>
						</a>
					</strong>
					</li>
					
					<li class="rounded">
						<a href="/city?favorite=32733">
							收藏
							<span class="star" title="收藏" id="userFavorites"></span></a>
							<script type="text/javascript">

									$.ajax({
			   							type: "POST",
			   							url: "/ajax/userFavorite",
			   							data: 1,
			   							success: function(result){
				   							$("#userFavorites").text(result);
				   								
										}
			 						});
							
</script>

					</li>
				

				<li><a href="/user/logout">退出</a>
				</li>
				
			
				<li style="display:none"><span class="ChoLanguage selected">
					<a href="#none" id="language_selector_cn" onClick="shiftLanguage('zh', 'CN')">简体中文</a></span></li>
	            <li style="display:none"><span class="EngLanguage">
	            	<a href="#none" id="language_selector_en" onClick="shiftLanguage('en', 'US')">English</a></span></li>
	       <!-- 
	            <li style="font-size:20px;margin-top:-4px;">400-696-6656</li>
	      -->
			<!-- 人人网
			<li><a href="#"
				onclick="XN.Connect.requireSession(function(){window.location.href='/renren/login'});return false;">人人登录</a>
			</li>
			end-->
			<!--    <li><a>新手上路</a></li>
    <li><a>帮助</a></li>-->
			
			
		</ul>
		<a href="../SendRoom.aspx" class="btn list_your_space">
			<span>发布房间</span>
		</a>
		</div>
		<p class="customer_hot_line"><span>400-696-6656</span><a href="/media">媒体报道</a></p>
	</div>
	
<div id="command_center">
  <!--
	menu =>  dashboard,inbox,rooms,trips,account,recommend
 -->

<ul id="nav">
	<li id="dashboardmenu"><a href="dashboard.aspx">我爱日租</a></li>
	<li id="inboxmenu"><a href="Index.aspx">收件箱</a></li>
	<li id="roomsmenu"><a href="MyRooms.aspx">我的房间</a></li>
	<li id="tripsmenu"><a href="Trips.aspx">出行计划</a></li>
	<li id="accountmenu"><a href="Warnset.aspx">账户信息</a></li>
	<li id="commentsmenu"><a href="Comments.aspx">评价推荐</a></li>
	<li id="vouchersmenu"><a href="Vouchersinvite.aspx">赢取租币</a></li>
</ul>

	






 <ul class="subnav">
    <li id="payout_pf_submenu"><a href="Payout_pf.aspx">收款方式</a></li>
    <li id="account_submenu" style="display:none"><a href="#">交易记录</a></li>    
    <li id="warnset_submenu"><a href="Warnset.aspx">邮件短信提醒</a></li>
    <li id="changepassword_submenu"><a href="ChangePassword.aspx">修改密码</a></li>
  </ul>






<script type="text/javascript">

	var item=document.getElementById('accountmenu');
	if (item){
		item.className='active';		
	}
	item=document.getElementById('payout_pf_submenu');
	if (item){
		item.className='active';		
	}

</script>







  <form action="/user/payout_pf" method="post" >
  <input type="hidden" name="doUpdate" id="doUpdate" value="true" >
  <div id="payout_pf" class="box">
    <div class="top"></div>
    <div class="middle">
      <h2>账户设置</h2>
      <div class="pay_content">
        <p class="pay_title" style="display:none"> <span class="tip">请仔细填写，填写错误会导致您收不到房款或退款！</span> </p>
        <div id="pay_mail_left">
          <p class="zhufubao_tt">
            <input type="radio" <%=Type==0 ? "checked" : "" %> value="1" name="paymentType" id="paymentType1" class="pay_icona" onClick="tab_shift('alipay_account')" />
            <img src="images/alipay.png" width="110" class="pay_zhi" />
            <label for="" class="savetxt" >使用支付宝交易</label>
            <label for="" class="jiaoyi" >支付宝账号： </label>
            <input type="text" value="<%=ALIPAYID %>" class="input_b inputtxt_l" id="alipayAccount" name="alipayAccount" class="payout" size="30" />
          </p>
          <p class="caifu_tt">
            <input type="radio" <%=Type==1 ? "checked" : "" %> value="2" name="paymentType" id="paymentType2" onClick="tab_shift('tenpay_account')"   />
            <img src="images/tenpay.png" width="110" />
            <label for="" class="savetxt">使用财付通交易</label>
            <label for="" class="jiaoyi" >财付通账号：</label>&nbsp;
             <input type="text" value="<%=TENPAYID %>" class="input_b inputtxt_l" id="tenpayAccount" name="tenpayAccount" class="payout" size="30"/>
          </p>
          <p class="caifu_tt">
            <input type="radio" <%=Type==2 ? "checked" : "" %> value="3" name="paymentType" id="paymentType3" onClick="tab_shift('paypal_account')"   />
            <img src="images/paypal.png" width="110" />
            <label for="" class="savetxt">使用PayPal交易</label>
            <label for="" class="savetxt">PayPal账号：</label>&nbsp;
             <input type="text" value="<%=PAYPALID %>" class="input_b inputtxt_l" id="paypalAccount" name="paypalAccount" class="payout" size="30"/>
          </p>
          <ul class="itm_caifu_tt">
            <li><input type="radio" <%=Type==3 ? "checked" : "" %> value="4" name="paymentType" id="paymentType4" onClick="tab_shift('bank_account')"   /> <b>银行卡: </b></li>
            <li><label for="" class="savetxt">开户银行 </label><input type="text" value="<%=Bank %>" class="input_b inputtxt_l" id="bankAccountSite" name="bankAccountSite" class="payout" size="30"/></li>
            <li><label for="" class="savetxt">银行账户 </label><input type="text" value="<%=BankAccount %>" class="input_b inputtxt_l" id="bankAccountNum" name="bankAccountNum" class="payout" size="30"/></li>
            <li><label for="" class="savetxt">户名 </label><input type="text" value="<%=AccountName %>"  class="input_b inputtxt_l" id="bankAccountName" name="bankAccountName" class="payout" size="30"/></li>
          </ul>
        </div>
        <div class="clear"></div>
        <div class="save_btn" style="padding-top:30px">
            <a href="#none" style="margin:0 auto" onclick="Update();" class="b_all b_blue">
            	保 存
            </a>
            <script type="text/javascript">
                function Update() {
                    var Type = -1;
                    var accountID;

                    var BankAccountSite;
                    var BankAccountNum;
                    var BankAccountName;
                    if (document.getElementById("paymentType1").checked == true) {
                        Type = 0;
                        AccountID = document.getElementById("alipayAccount").value;
                    }
                    if (document.getElementById("paymentType2").checked == true) {
                        Type = 1;
                        AccountID = document.getElementById("tenpayAccount").value;
                    }
                    if (document.getElementById("paymentType3").checked == true) {
                        Type = 2;
                        AccountID = document.getElementById("paypalAccount").value;
                    }
                    if (document.getElementById("paymentType4").checked == true) {
                        Type = 3;
                        BankAccountSite = document.getElementById("bankAccountSite").value;
                        BankAccountNum = document.getElementById("bankAccountNum").value;
                        BankAccountName = document.getElementById("bankAccountName").value;
                    }

                    
                    $.post('handler/UpdatePayoutInfo.ashx',
				            { TypeKey: Type,
				                AccountIDKey: AccountID,
				                BankAccountSiteKey: BankAccountSite,
				                BankAccountNumKey: BankAccountNum,
				                BankAccountNameKey: BankAccountName
				            },
				            function(result) {
				            })
                }
	      	</script>
        </div>
      </div>
    </div>
    <div class="bottom"></div>
  </div>
  </form>
</div>


	<!-- footer -->
	
<div id="footer">
  <p class="TxtEn">&copy; Copyright 2011 <a href="#">airizu.com 爱日租 版权所有</a>&nbsp;&nbsp;京ICP证110553 号
	 <br/>
	 <br/><img src="images/alipay.gif" width="123" height="40">&nbsp;&nbsp;
    <img src="images/tenpay.gif" width="96" height="40">&nbsp;&nbsp;    <img src="images/315.gif" width="89" height="40">    <img src="images/bluelogoair.gif"/></p>
</div>

	

</body>


</html>
